1. Field of the Invention
The present invention relates to a distance measuring device that measures a distance using a parallax image as well as a vehicle provided with the device.
2. Description of the Related Art
Various studies have been conventionally conducted regarding a distance measuring method using a parallax image. The parallax image is generated by a stereo method. The most general method among conventional distance measuring methods is described below. That is, a plurality of images is shifted by a parallax. Then, the sum of absolute differences (SAD) in the difference of brightness between a target pixel and pixels adjacent thereto is calculated. Then a parallax image is generated regarding a parallax with the smaller SAD as a parallax of the target pixel.
When the parallax image is generated using an FPGA (Field Programmable Gate Array) or a small CPU, the direct use of brightness values or values indicating extracted edge features leads to an increased calculation scale and thus increases the memory that is used. This results in an increased size of the distance measuring device. Accordingly, Japanese Examined Patent Publication No. 04-078924 discloses a stereo visual device. The stereo visual device uses a binarized edge image generated by binarizing the edge image of one of the original images, thus reducing the scale of calculations for generating the parallax image. Moreover, examples of vehicles provided with a distance measuring device include a vehicle that travels autonomously as described in Japanese Unexamined Patent Publication No. 2003-5832A.
The stereo visual device described in Japanese Examined Patent Publication No. 04-078924 generates an edge highlighted image having highlighted edges of one original image. Comparison is made between the pixel values of the edge highlighted image and a fixed value, and the resultant is binarized. Accordingly, the binarized edge image is generated. Then the parallax image is generated based on the binarized edge image and the other original image.
Japanese Unexamined Patent Publication No. 2003-5832A discloses a golf cart provided with an autonomous traveling device. This allows autonomous traveling along a guide path on a track. In addition, in Japanese Unexamined Patent Publication No. 2003-5832A, a distance to an obstacle is detected not with a parallax image but with an ultrasonic sensor.
However, the images of the same subject captured by individual cameras have variations in brightness. With the technique disclosed in Japanese Examined Patent Publication No. 04-078924, a binarized edge image is generated from the edge extraction image with a threshold. Consequently, the binarized edge image may easily be influenced by individual differences of the cameras capturing the images. This results in a decreased matching accuracy of the parallax image.